package com.xzg.erp.common;

import org.springframework.http.HttpStatus;

public class BusinessException extends RuntimeException {

    // 提供错误码和消息
    private HttpStatus status;
    private String message;

    public BusinessException(HttpStatus status, String message) {
        super(message);
        this.status = status;
        this.message = message;
    }

    // Getter 方法
    public HttpStatus getStatus() { return status; }
    public String getMessage() { return message; }
}
